home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
CC_C
/
0574.ZIP
/
GETDRV.ASM
< prev
next >
Wrap
Assembly Source File
|
1986-11-21
|
666b
|
42 lines
include compiler.inc
ttl GETDRV, 1.01, 11-21-86, cr
; gets current drive or current directory to DST
dseg
cseg
;getdrv(dst) char *dst;
procdef getdrv,<<dst,ptr>>
pushreg
pushds
mov ax,1900h ; get drive code
int 21h
add al,'A' ; convert to alpha
ldptr di,dst
cld
stosb
mov al,':' ; separator
stosb
xor al,al ; set in EOS
stosb
pret
pend getdrv
;getdir(dst) char *dst;
procdef getdir,<<dst1,ptr>>
pushreg
pushds
ldptr si,dst1
mov ax,'\' ; set in leading separator
mov [si], ax
mov ax,4700h ; get current dir to DS:SI
inc si ; past '\'
xor dl,dl
int 21h
pret
pend getdir
finish